/**
 * 
 */
package com.bolbachchan.common.ui;

import java.io.Serializable;
import java.util.Arrays;

/**
 * @author Chaitanya
 * 
 */
public class DefaultOutput extends DefaultScreenMessageContainer implements Output, Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -2760064223177430498L;

    private Dashboard[] dashboard;

    /**
     * 
     */
    public DefaultOutput() {
	super();
    }

    /**
     * @param dashboard
     */
    public DefaultOutput(Dashboard[] dashboard) {
	this.dashboard = dashboard;
    }

    /**
     * @return the dashboard
     */
    public Dashboard[] getDashboard() {
	return dashboard;
    }

    /**
     * @param dashboard
     *            the dashboard to set
     */
    public void setDashboard(Dashboard[] dashboard) {
	this.dashboard = dashboard;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("DefaultOutput [dashboard=");
	builder.append(Arrays.toString(dashboard));
	builder.append("]");
	return builder.toString();
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + Arrays.hashCode(dashboard);
	return result;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
	if (this == obj)
	    return true;
	if (obj == null)
	    return false;
	if (getClass() != obj.getClass())
	    return false;
	DefaultOutput other = (DefaultOutput) obj;
	if (!Arrays.equals(dashboard, other.dashboard))
	    return false;
	return true;
    }

}
